POV-Ray : Newsgroups : povray.general : (cos(pi/2)>0) and (cos(pi/2)=0) are both true : (cos(pi/2)>0) and (cos(pi/2)=0) are both true Server Time
8 Aug 2024 22:18:07 EDT (-0400)
  (cos(pi/2)>0) and (cos(pi/2)=0) are both true  
From: Didier
Date: 26 Sep 2000 20:04:03
Message: <39d13973$1@news.povray.org>
When running the following code, I get 2 spheres. I expected only one.
I use pov v3.1g on Windows98, P350, 128Mo.
A pov bug ? A windows bug?  Is floating-point math that not  precise ?

// ----------------------------------------

camera
{
  location  <0.0, 0.5, -4.0>
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 0.0,  0.0>
}

light_source
{
  0*x
  color White
  translate <-30, 30, -30>
}


#if (cos(pi/2)>0)
  sphere { 0.0, 1
    pigment {Yellow}
    translate x
    }
#end

#if (cos(pi/2)=0)
  sphere { 0.0, 1
    pigment {Green}
    translate -x
    }
#end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.